package com.demo.ecpPDF.controller;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@Validated
@RestController
//@Scope(value = WebApplicationContext.SCOPE_REQUEST)
@RequestMapping("/demo")
public class DemoController {
    @RequestMapping("/say")
    public String a(@RequestParam(value = "word", defaultValue = "a") String word) {
       if (word.equals("a")){
           System.out.println(10/0);
           return "a";
       } else {
           return "not a";
       }
    }
}



